package zuoye.ershouche.mapper;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import zuoye.ershouche.entity.Order;

@Mapper
public interface OrderMapper {

    @Insert("insert into ershouche.sys_order (buy_id, sell_id, car_id) values (#{userId}, #{sellId}, #{carId})")
    int insertOrder(int userId, int sellId, int carId);

    @Update("update ershouche.sys_order set status = 1 where id = #{id}")
    int updateOrder(int id);

    @Insert("delete from ershouche.sys_order where id = #{id}")
    int deleteOrderById(int id);
}
